function [ train_X, valid_X, test_X ] = normalizeTrainValidTestDataset( train_X, valid_X, test_X )

[train_X, mu, sigma] = zscore(train_X);
sigma(sigma == 0) = 1;
valid_X = bsxfun(@minus, valid_X, mu);
valid_X = bsxfun(@times, valid_X, 1./sigma);
test_X = bsxfun(@minus, test_X, mu);
test_X = bsxfun(@times, test_X, 1./sigma);

end
